<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link rel="shortcut icon" href="favicon.ico">
    <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
    <link th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
    <!-- bootstrap-table 表格插件样式 -->
    <link th:href="@{/ajax/libs/bootstrap-table/bootstrap-table.min.css}" rel="stylesheet"/>
    <link th:href="@{/css/animate.css}" rel="stylesheet"/>
    <link th:href="@{/css/style.css}" rel="stylesheet"/>
    <link th:href="@{/ruoyi/css/ry-ui.css}" rel="stylesheet"/>
    <link th:href="@{/css/my.css}" rel="stylesheet"/>
    <!-- layui -->
    <script th:src="@{/ajax/libs/layui/layui.js}"></script>

    <!--页面样式文件-->
    <link rel="stylesheet" th:href="@{/dist/css/main.css}">
    <style>

        .item {
            height: 450px !important;
        }

        .bottom {
            min-height: 382px !important;
        }
    </style>
</head>

<body class="">
<!--右侧主体-->

<div class="Greenhouse">
    <div class="row " style="margin: 0">
        <div class="col-sm-12  col-xs-12 middle-graph">
            <div class="time">
                <p class="p1">
                    温室：
                    <span th:text="${pengCount}">22</span> 个
                </p>
                <p class="p2">
                    在执行计划：
                    <span th:text="${planCount}">55</span> 个
                </p>
            </div>
        </div>
    </div>

    <div class="bottom-graph ">
        <div class="bottom-box">
            <div class="row">
                <div class="item col-lg-4 " th:each="peng:${pengs}" th:id="${peng.deptId}">
                    <div class="item-box">
                        <div class="top">
                            <div class="row" style="margin: 0;">
                                <div class="left  col-md-6" th:text="${peng.deptName}"></div>
                                <div class="right  col-md-6"><a th:href="@{/system/iot/data}">更多>></a></div>
                            </div>
                        </div>
                        <div class="bottom">

                            <div class="weather-item col-sm-6 col-xs-12 col-md-6 w-idx01">
                                <div class="w-main">
                                    <div class="w-item-top clearfix">
                                        <div class="w-icon fl"><img th:src="@{/dist/img/weather-icon02.png}" alt="">
                                        </div>
                                        <div class="w-name fr">空气温度</div>
                                    </div>
                                    <div class="w-item-btm">32<span class="unit">℃</span></div>
                                </div>
                            </div>
                            <div class="weather-item col-sm-6 col-xs-12 col-md-6 w-idx02">
                                <div class="w-main">
                                    <div class="w-item-top clearfix">
                                        <div class="w-icon fl"><img th:src="@{/dist/img/weather-icon03.png}" alt="">
                                        </div>
                                        <div class="w-name fr">空气湿度</div>
                                    </div>
                                    <div class="w-item-btm color03">71.7<span class="unit">%</span></div>
                                </div>
                            </div>
                            <div class="weather-item col-sm-6 col-xs-12 col-md-6 w-idx03">
                                <div class="w-main">
                                    <div class="w-item-top clearfix">
                                        <div class="w-icon fl"><img th:src="@{/dist/img/weather-icon02.png}" alt="">
                                        </div>
                                        <div class="w-name fr">土壤温度</div>
                                    </div>
                                    <div class="w-item-btm">32<span class="unit">℃</span></div>
                                </div>
                            </div>
                            <div class="weather-item col-sm-6 col-xs-12 col-md-6 w-idx04">
                                <div class="w-main">
                                    <div class="w-item-top clearfix">
                                        <div class="w-icon fl"><img th:src="@{/dist/img/weather-icon03.png}" alt="">
                                        </div>
                                        <div class="w-name fr">土壤湿度</div>
                                    </div>
                                    <div class="w-item-btm color03">71.7<span class="unit">%</span></div>
                                </div>
                            </div>
                            <div>
                                <a class="btn ml_8 fl-l" onclick="onPlan(this)" th:text="'正在执行计划:'+${peng.planCount}">正在执行</a>
                                <a class="btn btn-primary mlr_8 fl-r" onclick="autoCtrl(this)">智能控制</a>
                            </div>


                        </div>
                    </div>
                </div>


            </div>
        </div>

    </div>
</div>
</div>
</div>


<script th:src="@{/js/jquery.min.js}"></script>
<script th:src="@{/js/bootstrap.min.js}"></script>
<!-- 遮罩层 -->
<script th:src="@{/ajax/libs/layer/layer.min.js}"></script>
<script th:src="@{/ajax/libs/layui/layui.js}"></script>
<script th:src="@{/ruoyi/js/common.js?v=3.4.0}"></script>
<script th:src="@{/ruoyi/js/ry-ui.js?v=3.4.0}"></script>
<script th:src="@{/js/ry-ui.js?v=3.4.0}"></script>
<script th:src="@{/ruoyi/js/my-common-js.js}"></script>
<script th:inline="javascript">
    var ctx = [[@{
        /}]];

        function onPlan(e) {
            var deptId = $(e).parents('.item').attr('id');
            var link = ctx + 'system/front_wenshi/frontPlans?deptId=' + deptId;
            $.modal.openTab('正在执行计划', link);

        }

        function autoCtrl(e) {
            var deptId = $(e).parents('.item').attr('id');
            var url = baseWlwUrl + '/product.html';
            $.modal.openTab('智能控制', url);
        }
</script>

</body>

</html>